<div id="title_right">
	<p id="title_right_left"></p>
	<div id="title_right_center">
		<p class="chu_title">HÀNG TỒN KHO</p>
	</div>
	<p id="title_right_right"></p>
</div>
<?php
//var_dump($data['listmh']);
if($data['listmh']){?>
<table class="table">
  <tr class="mau2">
  	<td>STT</td>
    <td>Tên loại hàng</td>
    <td>Mặt hàng</td>
    <td>Số lượng tồn</td>
  </tr>

<?php	$i=1;
if (is_array($data['listmh'])){
	foreach ($data['listmh'] as $key => $value) {
		if($i%2==0){
			echo "<tr class='mau'>";
		}else
		{
			echo "<tr>";
		}
		?>
		<td><?php echo $i;?></td>
				<td>
				<?php
				if(is_array($data['listlh'])){
					foreach ($data['listlh'] as $item){
						if($item['MaLH']==$value['MaLH']){ 
							echo $item['TenLH'];
						}
					}
				}
				?>
				</td>
				<td><?php echo $value['TenMH'];?>  </td>
				
				<td><?php 
				if($value['SoLuong']>0){
				echo $value['SoLuong'];
	}
	else {
		echo "Hết hàng";
	}?> </td>
			</tr>
			<?php
			$i++;
				}	}	
			?>
		</table>
<?php 
	
}
	
?>
<?php
//Xuat phan trang 
	 echo "<p align='center'>";
	 echo "<br>";
	 echo $pagelist;
	  echo "<br>";
	   echo "<br>";
	    echo "<br>";
	 echo "</p>";
?>